package cn.edu.neusoft.demo.hospital2.Service.impl;

import cn.edu.neusoft.demo.hospital2.Dao.RoomDao;
import cn.edu.neusoft.demo.hospital2.Service.RoomService;
import cn.edu.neusoft.demo.hospital2.pojo.Room;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomServiceImpl implements RoomService {
    @Autowired
    private RoomDao roomDao;
    public List<Room> selectList() {
        return roomDao.selectList();
    }

    public int insert(Room room) {
        return roomDao.insert(room);
    }

    public Room selectById(Integer roomId) {
        return roomDao.selectById(roomId);
    }

    public int updateById(Room room) {
        return roomDao.updateById(room);
    }

    public int deleteById(Integer roomId) {
        return roomDao.deleteById(roomId);
    }
}
